package com.lingchen.boot.gof.proxy.cglib;

import org.springframework.cglib.proxy.Enhancer;

/**
 * Created by lc on 2020/6/28
 */
public class CgLibTest {

    public static void main(String[] args) {

        Landlord landlord = new Landlord();

        Landlord proxy = (Landlord) Enhancer.create(
                landlord.getClass(),
                new SFang(landlord)
        );
        proxy.pay("凌晨2");

    }
}
